<script setup>
import { ref, onMounted } from 'vue'

const list = ref([
  /* ... */
  1, 2, 3, 4
])

const itemRefs = ref([])

onMounted(() => console.log(itemRefs.value))
</script>

<template>
  <ul>
    <li v-for="item in list" ref="itemRefs" :key="item">
      {{ item }}
    </li>
  </ul>
</template>
